//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
	[Serializable]
	[Table(TableName = "WY_Room", EntityType = EntityType.Table, IsGB = false)]
    public abstract class AbstractRoom : CoreFrame.Business.AbstractBusines
	{
		private string _roomid;//编号
		/// <summary>
		/// 编号
		/// </summary>
        [Column(FieldName = "RoomId", DataKey = true, IsSingleQuote = false, Match = "Custom:Guid", IsInsert = false)]
		public string RoomId
		{
			get { return _roomid; }
			set { _roomid = value; }
		}
		private string _roomnumber;//
		/// <summary>
		/// 房间号
		/// </summary>
		[Column(FieldName = "RoomNumber", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string RoomNumber
		{
			get { return _roomnumber; }
			set { _roomnumber = value; }
		}
        private string _areacode;//区域编码
        /// <summary>
        /// 区域编码
        /// </summary>
        [Column(FieldName = "AreaCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string AreaCode
        {
            get { return _areacode; }
            set { _areacode = value; }
        }
		private string _buildingcode;//楼宇编号
		/// <summary>
		/// 楼宇编号
		/// </summary>
		[Column(FieldName = "BuildingCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string BuildingCode
		{
			get { return _buildingcode; }
			set { _buildingcode = value; }
		}
		private int _usetype;//门面、商住、商用
		/// <summary>
		/// 门面、商住、商用
		/// </summary>
		[Column(FieldName = "UseType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int UseType
		{
			get { return _usetype; }
			set { _usetype = value; }
		}
        private string _unit;//单元
		/// <summary>
		/// 单元
		/// </summary>
		[Column(FieldName = "Unit", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public string  Unit
		{
			get { return _unit; }
			set { _unit = value; }
		}
		private int _floornum;//楼层
		/// <summary>
		/// 楼层
		/// </summary>
		[Column(FieldName = "FloorNum", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int FloorNum
		{
			get { return _floornum; }
			set { _floornum = value; }
		}
		private int _roommodel;//户型
		/// <summary>
		/// 户型
		/// </summary>
		[Column(FieldName = "RoomModel", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int RoomModel
		{
			get { return _roommodel; }
			set { _roommodel = value; }
		}
		private int _toward;//朝向
		/// <summary>
		/// 朝向
		/// </summary>
		[Column(FieldName = "Toward", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int Toward
		{
			get { return _toward; }
			set { _toward = value; }
		}
		private int _struct;//结构 钢混、钢架、砖混
		/// <summary>
		/// 结构 钢混、钢架、砖混
		/// </summary>
		[Column(FieldName = "Struct", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int Struct
		{
			get { return _struct; }
			set { _struct = value; }
		}
		private decimal _construcarea;//建筑面积
		/// <summary>
		/// 建筑面积
		/// </summary>
		[Column(FieldName = "ConstrucArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal ConstrucArea
		{
			get { return _construcarea; }
			set { _construcarea = value; }
		}
		private decimal _usearea;//使用面积
		/// <summary>
		/// 使用面积
		/// </summary>
		[Column(FieldName = "UseArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal UseArea
		{
			get { return _usearea; }
			set { _usearea = value; }
		}
		private int _usestatus;//使用状态 空置、预订、已租、已售、装修、入住、保留、恢复
		/// <summary>
		/// 使用状态 空置、预订、已租、已售、装修、入住、保留、恢复
		/// </summary>
		[Column(FieldName = "UseStatus", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int UseStatus
		{
			get { return _usestatus; }
			set { _usestatus = value; }
		}
		private string _document;//相关文档
		/// <summary>
		/// 相关文档
		/// </summary>
		[Column(FieldName = "Document", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Document
		{
			get { return _document; }
			set { _document = value; }
		}
		private string _pictureurl;//图片信息
		/// <summary>
		/// 图片信息
		/// </summary>
		[Column(FieldName = "PictureUrl", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string PictureUrl
		{
			get { return _pictureurl; }
			set { _pictureurl = value; }
		}
		private int _deleteflag;//删除标志
		/// <summary>
		/// 删除标志
		/// </summary>
		[Column(FieldName = "DeleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int DeleteFlag
		{
			get { return _deleteflag; }
			set { _deleteflag = value; }
		}
		private string _memo;//备注
		/// <summary>
		/// 备注
		/// </summary>
		[Column(FieldName = "Memo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Memo
		{
			get { return _memo; }
			set { _memo = value; }
		}

        public abstract bool Save();

        public abstract bool Save(List<AbstractRoom> roomList);

        public abstract bool Delete(string _roomId);

        public abstract AbstractRoom GetRoom(string _roomNumber);
        /// <summary>
        /// 按条件获取所有房间
        /// </summary>
        /// <param name="_buildingCode">-1 全部 ；楼宇编号</param>
        /// <param name="_useType">0,全部 门面、商住、商用</param>
        /// <returns></returns>
        public abstract List<AbstractRoom> GetRoomList(string _buildingCode, int _useType);



        /// <summary>
        /// 按条件获取所有房间
        /// </summary>
        ///  <param name="_areacode">'' 全部 ；区域编号</param>
        /// <param name="_buildingCode">'' 全部 ；楼宇编号</param>
        /// <param name="_useType">'',全部 门面、商住、商用</param>
        /// <param name="_roomNumber">'',全部 房间号</param>
        /// <returns></returns>
        public abstract System.Data.DataTable GetRoomList(object value,PageInfo page);
	}
}